<template lang="">
    <div>
        <van-field label='名称' v-model='name'/>
        <van-button @click='add'>添加</van-button>

        <br />
        <!-- 展示工作流 -->
        <ul>
            <li v-for='i in wlist'>{{i.name}}</li>
        </ul>
    </div>
</template>
<script>
export default {
    data(){
        return{
            name:'',
            wlist:[]
        }
    },
    methods: {
        add(){
            this.axios.post('workf',{'name':this.name}).then(res=>{
                getlist()
            })
        },
      。l'lo  getlist(){
            this.axios.get('workf').then(res=>{
               this.wlist = res.data.list 
            })
        }
    },
    mounted() {
        this.getlist()
    },
}
</script>
<style lang="">
    
</style>